<script setup>
import { useI18n } from "vue-i18n";

function en(){
    locale.value = 'en'
}
function zh(){
  locale.value='zh-cn'
}
const { locale, t } = useI18n();
</script>
<template>
  <div>
    {{ t("title") }}
    {{ t("name") }}
    <button @click="en">英文</button>
    <button @click="zh">中文</button>
  </div>
</template>

<style lang="scss">
</style>